package com.javasm.controller;


import com.github.pagehelper.PageHelper;
import com.javasm.entity.TUser;
import com.javasm.http.AjaxRespEntity;
import com.javasm.service.ITUserService;
import com.javasm.service.impl.TUserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author jobob
 * @since 2021-12-27
 */
@RestController
public class TUserController {

    @Autowired
    private ITUserService tUserService;

    @RequestMapping("/testUser")
    public AjaxRespEntity testUser() {
        PageHelper.startPage(1,3);
        List<TUser> tUsers = tUserService.list();
        return  AjaxRespEntity.operateSuccess(tUsers);
    }


}
